package com.heys.inter;

/**
 * App
 * @author heys
 * @email heyishi@111
 * @desc 描述 告诉别人这个类是干嘛的 你是个傻X
 * 代码一定写的别人能看得懂 符合逻辑 数学逻辑 就是标准的
 * @tel 
 */
public class App {
    private static String[] color  = {"RED","GREEN"};
    enum COLOR{//可读性  可读性针对人的理解
        RED,GREED
    };
    public static void main(String[] args) {

        IUsb u = new IUsb(){
        
            @Override
            public void writ(byte[] source) {
                // TODO Auto-generated method stub
                
            }
        
            @Override
            public byte[] read() {
                // TODO Auto-generated method stub
                return null;
            }
        };


        // IUsb computer = new UsbInterface();
        // computer.toStr();
        // byte[] r =computer.read();

        // try {
        // System.out.println(new String(r,"UTF-8"));//gbk
        // computer.writ("中国".getBytes("UTF-8"));
        // } catch (UnsupportedEncodingException e) {
        // e.printStackTrace();
        // }

        // IUsb mobile = new MobileInterface();
        // mobile.toStr();
        // Apple apple = new Apple();
        // apple.name(computer);
        // apple.name(mobile);

        // IUsb iphone = new Ipone();
        // iphone.read();

        // byte[] r = iphone.read();
        // try {
        //     System.out.println(new String(r, "UTF-8"));// gbk
        //     iphone.writ("中国".getBytes("UTF-8"));
        // } catch (UnsupportedEncodingException e) {
        //     e.printStackTrace();
        // }

        System.out.println(String.format("ipcode=%s,ipdesc=%s", IP.IPV4.getCode(),IP.IPV4.getDesc()));
        System.out.println(IP.IPV5.getCode());
        System.out.println(COLOR.GREED);
        System.out.println(color[1]);
    }
}